package com.study.design.pattern.pattern.behavioral.observer.java;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;

/**
 * @Author: gongsl
 * @Date: 2025-03-23 22:51
 * @description: 观察者 - StockAnalyst（股票分析师）
 */
public class StockAnalyst implements PropertyChangeListener {
    @Override
    public void propertyChange(PropertyChangeEvent evt) {
        if ("stockPrice".equals(evt.getPropertyName())) {
            System.out.println("Stock Analyst: Stock price changed: " + evt.getOldValue() + " -> " + evt.getNewValue());
        }
    }
}
